﻿//------------------------------------------------------------------------------
// 创建标识: Copyright (C) 2009 Socansoft.com 版权所有
// 创建描述: SocanCode代码生成器自动创建于 2009-2-28 11:07:23
//
// 功能描述: 
//
// 修改标识: 
// 修改描述: 
//------------------------------------------------------------------------------

using System;
using System.Data;
using DALFactory;
using Model;
using System.Collections.Generic;
using System.Text;
using System.Web;
using System.Web.Caching;

namespace BLL
{
    /// <summary>
    /// 业务逻辑类 BRANDSHOW
    /// </summary>
    public class BRANDSHOW 
    {
        private readonly IDAL.IBRANDSHOW dal = DataAccess.CreateBRANDSHOW();
        public BRANDSHOW() { }

        #region  成员方法
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public void Add(Model.BRANDSHOW model)
        {
            dal.Add(model);
        }

        /// <summary>
        /// 增加多条数据
        /// </summary>
        public void Add(List<Model.BRANDSHOW> l)
        {
            foreach (Model.BRANDSHOW model in l)
                dal.Add(model);
        }

        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Model.BRANDSHOW model)
        {
            return dal.Update(model);
        }

        /// <summary>
        /// 更新多条数据
        /// </summary>
        public void Update(List<Model.BRANDSHOW> l)
        {
            foreach (Model.BRANDSHOW model in l)
                dal.Update(model);
        }

        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool Delete(string BS_CODE)
        {
            return dal.Delete(BS_CODE);
        }

        /// <summary>
        /// 删除多条数据
        /// </summary>
        public void Delete(List<string> l)
        {
            foreach (string BS_CODE in l)
                dal.Delete(BS_CODE);
        }

        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(string BS_CODE)
        {
            return dal.Exists(BS_CODE);
        }

        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public Model.BRANDSHOW GetModel(string BS_CODE)
        {
            return dal.GetModel(BS_CODE);
        }

        /// <summary>
        /// 获得泛型数据列表
        /// </summary>
        public List<Model.BRANDSHOW> GetAllList()
        {
            return dal.GetList() as List<Model.BRANDSHOW>;
        }

        /// <summary>
        /// 分页获取泛型数据列表,不建议直接使用此方法,请根据业务逻辑重写
        /// </summary>
        public List<Model.BRANDSHOW> GetList(int pageSize, int pageIndex, string fldSort, bool Sort, string strCondition, out int pageCount, out int Counts)
        {
            return dal.GetList(pageSize, pageIndex, fldSort, Sort, strCondition, out pageCount, out Counts) as List<Model.BRANDSHOW>;
        }
        #endregion
    }
}
